#ifndef ADDFRIEND_H
#define ADDFRIEND_H

#include <QWidget>
#include <QHostInfo>
#include <QMessageBox>
#include <QTcpSocket>
#include <QListWidgetItem>
namespace Ui {
class AddFriend;
}

class AddFriend : public QWidget
{
    Q_OBJECT

public:
    explicit AddFriend(QString uName,QWidget *parent = nullptr);
    ~AddFriend();
    QTcpSocket *tcpClient;
    qint16 port;
    QString getLocalIP();
    QString uName;//当前用户名
private slots:
    void on_commit_pushButton_clicked();
    void processPendingDatagrams();

    void on_refresh_pushButton_clicked();

    void on_avail_user_listWidget_itemClicked(QListWidgetItem *item);

private:
    Ui::AddFriend *ui;
};

#endif // ADDFRIEND_H
